﻿<krpano version="1.0.8">


	<!-- default quality settings -->
	<display flash10="on" movequality="LOW" stillquality="HIGH" movequality10="HIGH" stillquality10="HIGH" />


	<!-- events: set the custom cursor on start and fullscreen events for button changes -->
	<events onxmlcomplete="setuppano();"
	        onenterfullscreen="set(plugin[openfs].visible,false);
	                           set(plugin[closefs].visible,true);
	                           if(isandroid, set(plugin[android_openfs].visible,false); set(plugin[android_closefs].visible,true);  );
	                          "
	        onexitfullscreen ="set(plugin[openfs].visible,true);
	                           set(plugin[closefs].visible,false);
	                           if(isandroid, set(plugin[android_openfs].visible,true);  set(plugin[android_closefs].visible,false); );
	                          "
	        />



	<!-- button showtext() style -->
	<textstyle name="buttonstyle" font="Arial" fontsize="12" bold="true" italic="true"
	           textcolor="0x000000" background="false" border="false"
	           blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
	           origin="cursor" edge="bottom" xoffset="15" yoffset="-5" showtime="0.1" fadeintime="0.1" fadetime="0.1"
	           />

	<style name="button" url="%SWFPATH%/skin/buttons.png" keep="true" />


	<!-- some default buttons (zooming, direction, hotspots on/off, fullscreen) -->
	<plugin name="in"       devices="desktop|tablet" align="bottom" x="-160" y="10" style="button" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" ondown="set(fov_moveforce,-1);"  onup="set(fov_moveforce,0);" />
	<plugin name="out"      devices="desktop|tablet" align="bottom" x="-120" y="10" style="button" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" ondown="set(fov_moveforce,+1);"  onup="set(fov_moveforce,0);" />
	<plugin name="left"     devices="desktop|tablet" align="bottom" x="-80"  y="10" style="button" crop=  "0|0|40|40" onovercrop=  "0|40|40|40" ondowncrop=  "0|80|40|40" ondown="set(hlookat_moveforce,-1);"  onup="set(hlookat_moveforce,0);" />
	<plugin name="right"    devices="desktop|tablet" align="bottom" x="-40"  y="10" style="button" crop= "40|0|40|40" onovercrop= "40|40|40|40" ondowncrop= "40|80|40|40" ondown="set(hlookat_moveforce,+1);"  onup="set(hlookat_moveforce,0);" />
	<plugin name="up"       devices="desktop|tablet" align="bottom" x="+0"   y="10" style="button" crop= "80|0|40|40" onovercrop= "80|40|40|40" ondowncrop= "80|80|40|40" ondown="set(vlookat_moveforce,-1);"  onup="set(vlookat_moveforce,0);" />
	<plugin name="down"     devices="desktop|tablet" align="bottom" x="+40"  y="10" style="button" crop="120|0|40|40" onovercrop="120|40|40|40" ondowncrop="120|80|40|40" ondown="set(vlookat_moveforce,+1);"  onup="set(vlookat_moveforce,0);" />
	<plugin name="quality"  devices="desktop|tablet" align="bottom" x="+80"  y="10" style="button" crop="240|0|40|40" onovercrop="240|40|40|40" ondowncrop="240|80|40|40" onhover="showtext(Toggle Quality, buttonstyle);" onclick="switch(display.flash10,on,off);invalidatescreen();" />
	<plugin name="dragmode" devices="desktop|tablet" align="bottom" x="+120" y="10" style="button" crop="400|0|40|40" onovercrop="400|40|40|40" ondowncrop="400|80|40|40" onhover="showtext(Change Controlmode, buttonstyle);"  onclick="action(dragcursor);" visible="true"  />
	<plugin name="movemode" devices="desktop|tablet" align="bottom" x="+120" y="10" style="button" crop="360|0|40|40" onovercrop="360|40|40|40" ondowncrop="360|80|40|40" onhover="showtext(Change Controlmode, buttonstyle);"  onclick="action(qtvrcursor);" visible="false" />
	<plugin name="openfs"   devices="desktop|tablet" align="bottom" x="+160" y="10" style="button" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" onhover="showtext(Fullscreen, buttonstyle);"      onclick="set(fullscreen,true);"  visible="true"  />
	<plugin name="closefs"  devices="desktop|tablet" align="bottom" x="+160" y="10" style="button" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" onhover="showtext(Exit Fullscreen,buttonstyle);"  onclick="set(fullscreen,false);" visible="false" />

	<plugin name="android_in"       devices="android" align="leftbottom"  x="20"  y="20" scale="2.0" style="button" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" ondown="set(fov_moveforce,-1);"  onup="set(fov_moveforce,0);" />
	<plugin name="android_out"      devices="android" align="leftbottom"  x="100" y="20" scale="2.0" style="button" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" ondown="set(fov_moveforce,+1);"  onup="set(fov_moveforce,0);" />
	<plugin name="android_openfs"   devices="android" align="rightbottom" x="20"  y="20" scale="2.0" style="button" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" onhover="showtext(Fullscreen, buttonstyle);"      onclick="set(fullscreen,true);"  visible="true"  />
	<plugin name="android_closefs"  devices="android" align="rightbottom" x="20"  y="20" scale="2.0" style="button" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" onhover="showtext(Exit Fullscreen,buttonstyle);"  onclick="set(fullscreen,false);" visible="false" />

	<!-- right-click context menu to change the viewing settings -->
	<contextmenu>
		<item caption="深圳红天下文化传播有限公司"     />
		
	</contextmenu>



	<!-- actions to change the mouse cursor -->
	<action name="dragcursor">
		set(plugin[dragmode].visible, false);
		set(plugin[movemode].visible, true);
		set(control.mousetype, drag2D);
		set(cursors.url, %SWFPATH%/skin/drag-cursors.png);
		set(cursors.type, drag);
		set(cursors.move,  2|0|30|32);
		set(cursors.drag, 37|0|30|32);
	</action>

	<action name="qtvrcursor">
		set(plugin[dragmode].visible, true);
		set(plugin[movemode].visible, false);
		set(control.mousetype, moveto);
		set(cursors.url, %SWFPATH%/skin/qtvr-cursors.png);
		set(cursors.type, 8way);
		set(cursors.move,       0|0|16|16);
		set(cursors.drag,      16|0|16|16);
		set(cursors.arrow_u,   32|0|16|16);
		set(cursors.arrow_d,   48|0|16|16);
		set(cursors.arrow_l,   64|0|16|16);
		set(cursors.arrow_r,   80|0|16|16);
		set(cursors.arrow_lu,  96|0|16|16);
		set(cursors.arrow_ru, 112|0|16|16);
		set(cursors.arrow_rd, 128|0|16|16);
		set(cursors.arrow_ld, 144|0|16|16);
	</action>



	<!-- actions for view changing -->
	<action name="view_normal">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  0.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(display.flash10,on); );
	</action>


	<action name="view_fisheye">
		set(display.flash10,off);
		tween(view.architectural, 0.0, distance(1.0, 0.30), easeoutquad);
		tween(view.fisheye,       0.0 ,distance(1.0, 0.30), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(view.fovmax,179); tween(view.fisheye, 0.35, distance(1.0,1.25)); );
	</action>


	<action name="view_architectural">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  1.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false);set(view.pannini,false);set(display.flash10,on); );
	</action>


	<action name="view_stereographic">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		set(backtonormalfirst,false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>


	<action name="view_pannini">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		set(backtonormalfirst,false);
		if(view.pannini       == false, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, true);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>


	<action name="view_littleplanet">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		tween(view.vlookat,  90, distance(179, 1.50), easeoutquad);

		set(backtonormalfirst,false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
		tween(view.fov,     150, distance(179, 0.75), easeoutquad);
	</action>



	<!-- setup pano, will be called on the onxmlcomplete event -->
	<action name="setuppano">
		<!-- set qtvr cursor -->
		action(qtvrcursor);

		<!-- hide the other view settings in the context menu on partial panos -->
		if(ispartialpano === true, set(showviewitems,false), set(showviewitems,true));

		set(contextmenu.item[2].visible, get(showviewitems));
		set(contextmenu.item[3].visible, get(showviewitems));
		set(contextmenu.item[4].visible, get(showviewitems));
		set(contextmenu.item[5].visible, get(showviewitems));
		set(contextmenu.item[6].visible, get(showviewitems));
		set(contextmenu.item[7].visible, get(showviewitems));
	</action>

</krpano>
